/*
    SUSAN® - Sole of Unix Save ANything

   Copyright (C) 2016-2019 Skyatlas co. ltd

   
*/

#ifndef BAREOS_DIRD_MSGCHAN_H_
#define BAREOS_DIRD_MSGCHAN_H_

class alist;

namespace directordaemon {

bool StartStorageDaemonJob(JobControlRecord* jcr,
                           alist* read_storage,
                           alist* write_storage,
                           bool send_bsr = false);
bool StartStorageDaemonMessageThread(JobControlRecord* jcr);
int BgetDirmsg(BareosSocket* bs, bool allow_any_msg = false);
void WaitForStorageDaemonTermination(JobControlRecord* jcr);

} /* namespace directordaemon */
#endif  // BAREOS_DIRD_MSGCHAN_H_
